package cn.schoolwow.workflow.module.instance.action.service;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import cn.schoolwow.workflow.module.instance.action.flow.start.StartWorkFlowQueryFlow;
import cn.schoolwow.workflow.module.instance.action.flow.start.StartWorkFlowTransactionFlow;
import cn.schoolwow.workflow.module.task.action.flow.complete.listener.ExecuteAfterTaskCreateListenerFlow;

public class StartWorkFlowServiceFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        flowContext.executeFlowList(
                new StartWorkFlowQueryFlow(),
                new StartWorkFlowTransactionFlow(),
                new ExecuteAfterTaskCreateListenerFlow()
        );
    }

    @Override
    public String name() {
        return "启动工作流实例服务流程";
    }

}
